package com.xiyi.shouxin.entity.user.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.lang.Nullable;

import com.xiyi.shouxin.entity.user.PiciRecord;

public class PiciRecordMapper implements RowMapper<PiciRecord> {

    @Override
    @Nullable
    public PiciRecord mapRow(@Nullable ResultSet rs, int rowNum) throws SQLException {
        PiciRecord record = new PiciRecord();
        if (rs == null) {
            return record;
        }
        record.setId(rs.getLong("id"));
        record.setAdminId(rs.getLong("admin_id"));
        record.setCreatedAt(rs.getTimestamp("created_at"));
        record.setIsOver(rs.getInt("is_over"));
        return record;
    }

}
